﻿package com.toncen.samepms.system.domain;

import java.util.ArrayList;
import java.util.List;

import com.toncen.samepms.common.AbstractDomain;
import com.toncen.samepms.common.IPropertyUniqueble;
import com.toncen.samepms.common.Unique;

/**
 * 描述：编码表SYSTEM_CODE的domain文件
 * 
 * @author tch
 */
public class Code extends AbstractDomain implements IPropertyUniqueble{
	/**
	 * 序列号
	 */
	private static final long serialVersionUID = 1331288218312L;

	/**
	 * 编码
	 */
	@Unique(column="CODE",title="编码")
	private String code;

	/**
	 * 编码描述
	 */
	private String description;

	/**
	 * 顺序
	 */
	private int sequence=10;

	/**
	 * 
	 */
	private List<CodeItem> codeItemList = new ArrayList<CodeItem>();

	public Code() {
		super();
	}

	/**
	 * @return the code
	 */
	public String getCode() {
		return code;
	}

	/**
	 * @param code
	 *            the code to set
	 */
	public void setCode(String code) {
		this.code = code;
	}

	/**
	 * @return the description
	 */
	public String getDescription() {
		return description;
	}

	/**
	 * @param description
	 *            the description to set
	 */
	public void setDescription(String description) {
		this.description = description;
	}

	/**
	 * @return the sequence
	 */
	public int getSequence() {
		return sequence;
	}

	/**
	 * @param sequence
	 *            the sequence to set
	 */
	public void setSequence(int sequence) {
		this.sequence = sequence;
	}

	/**
	 * @return the codeItemList
	 */
	public List<CodeItem> getCodeItemList() {
		return codeItemList;
	}

	/**
	 * @param codeItemList
	 *            the codeItemList to set
	 */
	public void setCodeItemList(List<CodeItem> codeItemList) {
		this.codeItemList = codeItemList;
	}

	public String getPrimaryName() {
		// TODO Auto-generated method stub
		return "ID";
	}

	public String getTableName() {
		// TODO Auto-generated method stub
		return "SYSTEM_CODE";
	}

}
